/*
 * Creation : 24/09/2014
 */
package com.mycompany.app.service.impl;

import java.util.List;

import com.mycompany.app.dao.CustomerDAO;
import com.mycompany.app.model.Customer;
import com.mycompany.app.service.CustomerService;

public class CustomerServiceImpl implements CustomerService {

	CustomerDAO customerDAO;

	// DI via Spring
	public void setCustomerDAO(CustomerDAO customerDAO) {
		this.customerDAO = customerDAO;
	}

	// call DAO to save customer
	public void addCustomer(Customer customer) {
		customerDAO.addCustomer(customer);
	}

	// call DAO to return customers
	public List<Customer> listCustomer() {
		return customerDAO.listCustomer();
	}
}
